/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package cn.hxcx.top.modules.dvc.entity;

import cn.hxcx.top.modules.sys.entity.Office;
import cn.hxcx.top.modules.sys.entity.User;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import cn.hxcx.top.common.persistence.DataEntity;

/**
 * 设备借用Entity
 * @author DoubleX
 * @version 2019-07-13
 */
public class DeviceUse extends DataEntity<DeviceUse> {
	
	private static final long serialVersionUID = 1L;
	private User user;		// 用户id
	private String deviceId;		// 设备编号
	private Date borrowDate;		// 借出日期
	private Date backDate;		// 归还日期
	private String deviceUse;		// 设备用途
	private String borrowStatus;
	
	//查询属性
	private String deviceName;
	private Office deviceOffice;
	
	public DeviceUse() {
		super();
	}

	public DeviceUse(String id){
		super(id);
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	@Length(min=0, max=64, message="设备编号长度必须介于 0 和 64 之间")
	public String getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getBorrowDate() {
		return borrowDate;
	}

	public void setBorrowDate(Date borrowDate) {
		this.borrowDate = borrowDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getBackDate() {
		return backDate;
	}

	public void setBackDate(Date backDate) {
		this.backDate = backDate;
	}
	
	@Length(min=0, max=255, message="设备用途长度必须介于 0 和 255 之间")
	public String getDeviceUse() {
		return deviceUse;
	}

	public void setDeviceUse(String deviceUse) {
		this.deviceUse = deviceUse;
	}

	public String getDeviceName() {
		return deviceName;
	}

	public void setDeviceName(String deviceName) {
		this.deviceName = deviceName;
	}

	public Office getDeviceOffice() {
		return deviceOffice;
	}

	public void setDeviceOffice(Office deviceOffice) {
		this.deviceOffice = deviceOffice;
	}

	public String getBorrowStatus() {
		return borrowStatus;
	}

	public void setBorrowStatus(String borrowStatus) {
		this.borrowStatus = borrowStatus;
	}
	
}